home *** CD-ROM | disk | FTP | other *** search
- package TestCollection;
-
- public class MusicCollection {
- private Album[] albums = new Album[2];
-
- public MusicCollection() {
- Album a1 = new Album();
- a1.setTitle("Mr T1");
- a1.setArtist("Mr A1");
- a1.setYear("Y2K");
- this.albums[0] = a1;
- Album a2 = new Album();
- a2.setTitle("Mr T2");
- a2.setArtist("Mr A2");
- a2.setYear("Y2K2");
- this.albums[1] = a2;
- }
-
- public Album[] getAlbums() {
- return this.albums;
- }
-
- public Album getAlbums(int index) {
- return this.albums[index];
- }
-
- public int getAlbumsSize() {
- return this.albums.length;
- }
-
- public void setAlbums(int index, Album aAlbum) {
- }
-
- public void setAlbums(Album[] albums) {
- }
- }
-